_base_ = [
    '../../_base_/custom_imports.py',
    '../../_base_/datasets/ISIC.py',
    '../../_base_/schedules/imagenet_dense.py',
    '../../_base_/default_runtime.py',
]

lr = 6e-4
n = 1

dataset = 'ISIC'
exp_num = 1

run_name = f'vit-base_{dataset}'

model = dict(
    type='Sep_ImageClassifier',
    backbone=dict(
        type='AdaptVPT',
        # type='FullDeiT3',
        arch='base',
        patch_size=16,
        img_size=224,
        ),
    head=dict(
        type='LinearClsHead',
        num_classes=7,
        in_channels=768,
        loss=dict(type='CrossEntropyLoss', loss_weight=1.0),
    ))
data = dict(
    samples_per_gpu=128,  # use 2 gpus, total 128
    train=dict(
        ann_file=f'data/MedFMC/{dataset}/trainval.txt'),
    val=dict(ann_file=f'data/MedFMC/{dataset}/test.txt'),
    test=dict(ann_file=f'data/MedFMC/{dataset}/test.txt'))

optimizer = dict(lr=lr)

log_config = dict(
    interval=10, hooks=[
        dict(type='TextLoggerHook'),
    ])

load_from = 'work_dirs/vit-base-p16_3rdparty_pt-64xb64_in1k-224_20210928-02284250.pth'
work_dir = f'work_dirs/full/{run_name}/exp{exp_num}'

runner = dict(type='EpochBasedRunner', max_epochs=10)

# yapf:disable
log_config = dict(
    interval=10,
    hooks=[
        dict(type='TextLoggerHook'),
    ])
